package chatmsg

type Msg struct {
	Type string
	Data interface{}
}

func NewTextMsg(text string) *Msg {
	return &Msg{Type: "Text", Data: text}
}

type UploadInfo struct {
	Url      []string
	Pwd      string
	FileName string
	FileSize int64
}

func NewImageMsg(up *UploadInfo) *Msg {
	return &Msg{Type: "Image", Data: up}
}

func NewFileMsg(up *UploadInfo) *Msg {
	return &Msg{Type: "File", Data: up}
}

func NewHtmlMsg(title, html string) *Msg {
	return &Msg{Type: "Html", Data: map[string]string{"Title": title, "Content": html}}
}
